package com.awesomeproject;

import android.content.Context;

import com.superrecycleview.superlibrary.adapter.BaseViewHolder;
import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter;

import java.text.SimpleDateFormat;
import java.util.List;

/**
 * Created by Administrator on 2017/2/25.
 */

public class MainAdapter extends SuperBaseAdapter<String>{
    @Override
    protected void convert(BaseViewHolder holder, String item, int position) {
        SimpleDateFormat sDateFormat=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        holder.setText(R.id.home_recyclerview_list_title, "销量数据");
        holder.setText(R.id.home_recyclerview_list_time, sDateFormat.format(new java.util.Date()));
        holder.setText(R.id.home_recyclerview_list_shopName, "人民店");
        holder.setText(R.id.home_recyclerview_list_money, item+"明细数据");
    }

    @Override
    protected int getItemViewLayoutId(int position, String item) {
        return R.layout.item_list_text;
    }

    public MainAdapter(Context context, List<String> data) {
        super(context, data);
    }
}
